{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "a51e7f6d",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(80, 200, 3)\n",
      "80\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "-1"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import cv2\n",
    "img = cv2.imread('image5.png',1)\n",
    "imginfo = img.shape\n",
    "print(imginfo)\n",
    "height = imginfo[0]\n",
    "width = imginfo[1]\n",
    "mode = imginfo[2]\n",
    "print(height)\n",
    "dstHeight = int(height*0.5)\n",
    "dstWidth = int(width*0.5)\n",
    "dst = cv2.resize(img,(dstWidth,dstHeight))\n",
    "cv2.imshow('image',dst)\n",
    "cv2.waitKey(0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "a43c027d",
   "metadata": {},
   "outputs": [],
   "source": [
    "import cv2\n",
    "import numpy as np\n",
    "img = cv2.imread('image5.png',1)\n",
    "imginfo = img.shape\n",
    "# cv2.imshow('src',img)\n",
    "mateRotate = cv2.getRotationMatrix2D((height,width),45,0.5)\n",
    "dst = cv2.warpAffine(img,mateRotate,(height,width))\n",
    "cv2.imshow('dst',dst)\n",
    "cv2.waitKey()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
